package com.sen.demo.thread;

import lombok.extern.slf4j.Slf4j;

/**
 * @className: TradeRunable
 * @Auther: jiesen.liu
 * @Date: 2019/7/22 14:16
 * @package: com.sen.demo.thread
 */
@Slf4j
public class TradeRunable implements Runnable {

    private String name;

    public TradeRunable(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        Thread.currentThread().setName(name);
        log.info("{}正在执行线程", name);
        try {
            Thread.sleep(30000L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
